﻿#region Legal notice
/*
 * This file is part of EPPLib.
 * Copyright 2010, 2011 
 * Gianluca Esposito (info@gianlucaesposito.it)
 * ----------------------------------------------------------------------------
 * EPPLib is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
 * (at your option) any later version.
 * 
 * EPPLib is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Nome-Programma; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
#endregion

#region Using directives
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;
using System.Xml.Serialization;
using System.Text;
using System.Xml;
using System.Xml.Schema;
#endregion

namespace EPPLib.Objects
{
    [Serializable]
    public class AddressInfoObject : BaseObject
    {
        #region Constants
        private const int MAX_ADDRESS_ITEMS = 3;
        #endregion

        #region Members
        private string[] _address;
        private string _city;
        private string _district;
        private string _postalCode;
        private string _countryCode;
        #endregion

        #region Properties
        [XmlElement(ElementName = "street")]
        public string[] Address { get { return _address; } set { _address = value; } }

        [XmlElement(ElementName = "city")]
        public string City { get { return _city; } set { _city = value; } }

        [XmlElement(ElementName = "sp")]
        public string District { get { return _district; } set { _district = value; } }

        [XmlElement(ElementName = "pc")]
        public string PostalCode { get { return _postalCode; } set { _postalCode = value; } }

        [XmlElement(ElementName = "cc")]
        public string CountryCode { get { return _countryCode; } set { _countryCode = value; } }
        #endregion

        #region Constructor(s)
        public AddressInfoObject()
        {
            _address = new string[MAX_ADDRESS_ITEMS];
            _city = string.Empty;
            _district = string.Empty;
            _postalCode = string.Empty;
            _countryCode = string.Empty;
        }
        #endregion
    }
}